package com.bbcare.cp.plat.store.ibatis.dictconf;

import java.util.List;
import java.util.Map;

import com.bbcare.cp.plat.entity.dictconf.BsServiceDict;
import com.bbcare.cp.plat.entity.dictconf.BsWxContent;
import com.bbcare.cp.plat.entity.dictconf.FuInformruleDict;
import com.bbcare.cp.plat.entity.dictconf.FuLostReason;
import com.bbcare.cp.plat.entity.sms.BsWechatTemplate;
import com.bbcare.cp.plat.entity.sms.FuInformmsgRule;

/*
 * @name:         配置表存储接口
 * @author:       DemonLee
 * @createTime:   2017.4.23
 * @description:  配置表信息
 * @modify:
 * 	
 */
public interface IConfCacheDAO {
    /**
     * au_tenant 租户信息查询
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> listTenantByCondition(Map<String, Object> paramMap) throws Exception;

    /**
     * au_account_application 账号应用关联信息查询
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> listAccAppByCondition(Map<String, Object> paramMap) throws Exception;

    /**
     * bs_static_param表信息获取
     * 
     * @param table_name
     * @return list
     */
    public List<Map<String, Object>> selectBsStaticParam(Map<String, Object> paramMap) throws Exception;

    /**
     * bs_static_param表信息获取，根据租户id等条件查询
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> selectBsStaticParamByTenant(Map<String, Object> paramMap) throws Exception;

    /**
     * 根据type 从配置表信息获取 某一类型数据 deptId 传空 查询系统公用配置 传deptId 查询科室私有的系统配置
     * 
     * @param table_name
     * @return list
     */
    public List<Map<String, Object>> selectBsStaticParamByCondition(Map<String, Object> paramMap) throws Exception;

    /**
     * bs_static_param表信息获取
     * 
     * @param type,param_code
     * @return list
     */
    public List<Map<String, Object>> selectBsStaticParamByTypeAndCode(Map<String, Object> paramMap) throws Exception;

    /**
     * fu_lostreason_dict 按id查询失访原因
     * 
     * @param
     * @return list
     */
    public List<FuLostReason> selectLostReason(Map<String, Object> paramMap) throws Exception;

    /**
     * fu_lostreason_dict失访原因查询
     * 
     * @param
     * @return list
     */
    public List<FuLostReason> selectAllLostReason(Map<String, Object> paramMap) throws Exception;

    /**
     * fu_informrule_dict随访规则查询
     * 
     * @param
     * @return list
     */
    public List<FuInformruleDict> getRuleByQueueId(Map<String, Object> map) throws Exception;

    /**
     * fu_informrule_dict/fu_queue_info随访规则关联查询
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> listCycleQueueFromInformRule(Map<String, Object> map) throws Exception;

    public List<Map<String, Object>> listWinQueueFromInformRule(Map<String, Object> map) throws Exception;

    /**
     * fu_informrule_dict/fu_queue_info 根据条件查询队列发送短信规则
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> listInformRuleByFollowUptime(Map<String, Object> map) throws Exception;

    /**
     * bs_service_dict按服务名查询服务配置
     * 
     * @param
     * @return list
     */
    public List<BsServiceDict> getServiceDictByServName(Map<String, Object> map) throws Exception;

    /**
     * fu_contentclass_dict任务内容分类查询
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> listContentClass(Map<String, Object> map) throws Exception;

    /**
     * bs_wechat_info微信查询
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> selectwechat(Map<String, Object> map) throws Exception;

    /**
     * bs_wechat_info微信绑定手机
     * 
     * @param
     * @return list
     */
    public void savwechatInfo(Map<String, Object> map) throws Exception;

    /**
     * 更新bs_wechat_info微信绑定手机
     * 
     * @param
     * @return list
     */
    public void updatewechat(Map<String, Object> map) throws Exception;

    /**
     * 查询队列权限
     * 
     * @param
     * @return list
     */
    public List<Map<String, Object>> selectAuthorId(Map<String, Object> map) throws Exception;

    // 根据二维码传入code 查询科室和队列
    Map<String, Object> selectDeptAndQueueIdByCode(Map<String, Object> map) throws Exception;

    BsWxContent selectWxContent(Map<String, Object> map) throws Exception;
    
    
    /**查询微信模板 */
	BsWechatTemplate selectWechatTemplate(Map<String, Object> mapIn) throws Exception;
	
	/**保存微信模板*/
	int saveWechatTemplate(List<BsWechatTemplate> list) throws Exception;
	
	/**根据具体任务、或业务类型 查询项目、队列下消息发送规则*/
	List<FuInformmsgRule> selectFuInformRules(Map<String, Object> mapIn) throws Exception;
	
	/**定时任务查询消息规则*/
	List<FuInformmsgRule> selectTimeTasknotifyRuleList(Map<String, Object> mapIn) throws Exception;
	
    /** 根据id查询短信模板*/
    Map<String, Object> selectSmsTemplateById(Map<String, Object> paramMap) throws Exception;
}
